/*
 * @Author: your name
 * @Date: 2021-04-17 16:34:58
 * @LastEditTime: 2021-04-20 08:14:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \智慧医疗项目\patient-app\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import( /* webpackChunkName: "home" */ '../views/Home.vue'),
    redirect: '/home/homes',
    children: [{
      path: 'homes',
      name: 'Homes',
      meta: {
        title: '首页'
      },
      component: () => import( /* webpackChunkName: "homes" */ '../views/pages/homes.vue'),
    }, {
      path: 'question',
      name: 'Question',
      meta: {
        title: '快速问诊'
      },
      component: () => import( /* webpackChunkName: "question" */ '../views/pages/question.vue'),
    }, {
      path: 'my',
      name: 'My',
      meta: {
        title: '我的'
      },
      component: () => import( /* webpackChunkName: "my" */ '../views/pages/my.vue'),
    }]
  },
  {
    path: '/docList',
    name: 'DocList',
    meta: {
      title: '全部科室'
    },
    component: () => import( /* webpackChunkName: "docList" */ '../views/pages/docList.vue'),
  },
  {
    path: '/live',
    name: 'Live',
    meta: {
      title: '直播'
    },
    component: () => import( /* webpackChunkName: "live" */ '../views/pages/live.vue'),
  },
  {
    path: '/seckill',
    name: 'Seckill',
    meta: {
      title: '秒杀专场'
    },
    component: () => import( /* webpackChunkName: "seckill" */ '../views/pages/seckill.vue'),
  },
  {
    path: '/goodsDetail',
    name: 'GoodsDetail',
    meta: {
      title: '商品详情'
    },
    component: () => import( /* webpackChunkName: "goodsDetail" */ '../views/pages/goodsDetail.vue'),
  },
  {
    path: '/carList',
    name: 'CarList',
    meta: {
      title: '购物车'
    },
    component: () => import( /* webpackChunkName: "carList" */ '../views/pages/carList.vue'),
  },
  {
    path: '/pay',
    name: 'Pay',
    meta: {
      title: '支付'
    },
    component: () => import( /* webpackChunkName: "pay" */ '../views/pages/pay.vue'),
  },
  {
    path: '/doctorLive',
    name: 'DoctorLive',
    meta: {
      title: '医生直播'
    },
    component: () => import( /* webpackChunkName: "pay" */ '../views/pages/doctorLive.vue'),
  },
  {
    path: '/login',
    name: 'Login',
    meta: {
      title: '登录'
    },
    component: () => import( /* webpackChunkName: "login" */ '../views/login.vue'),
  },
  {
    path: '/register',
    name: 'Register',
    meta: {
      title: '注册'
    },
    component: () => import( /* webpackChunkName: "register" */ '../views/register.vue'),
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router